package com.health.db.service.user.impl;

import com.health.db.dao.user.IUserAccountJournalDao;
import com.health.db.dao.user.IUserAccountLedgerDao;
import com.health.db.dao.user.IUserAccountVoucherBillDao;
import com.health.db.model.UserAccountLedger;
import com.health.db.service.user.IUserAccountLedgerService;

public class UserAccountLedgerServiceImpl implements IUserAccountLedgerService {

	private IUserAccountLedgerDao userAccountLedgerDao;
	
	IUserAccountJournalDao userAccountJournalDao ; 
	IUserAccountVoucherBillDao userAccountVoucherBillDao;
	 
	@Override
	public int insertAccountLedger(UserAccountLedger record) {
		int result=-1;
		result= userAccountLedgerDao.insertAccountLedger(record);
		return result;
	}

	@Override
	public UserAccountLedger selectByUserId(Long userId) {
		UserAccountLedger u=userAccountLedgerDao.selectByUserId(userId);
		return u;
	}

	@Override
	public int updatAccountLedgerByUserIdSelective(UserAccountLedger record) {
		int result=-1;
		result= userAccountLedgerDao.updatAccountLedgerByUserIdSelective(record);
		return result;
	}

	@Override
	public int updateBalance(UserAccountLedger record) {
		int result=-1;
		result= userAccountLedgerDao.updateBalance(record);
		return result;
	}

	

	@Override
	public UserAccountLedger selectUserAccountLedgerByUserId(Long userId) {
		UserAccountLedger u=userAccountLedgerDao.selectUserAccountLedgerByUserId(userId);
		return u;
	}

	
	public IUserAccountLedgerDao getUserAccountLedgerDao() {
		return userAccountLedgerDao;
	}

	public void setUserAccountLedgerDao(IUserAccountLedgerDao userAccountLedgerDao) {
		this.userAccountLedgerDao = userAccountLedgerDao;
	}

	public IUserAccountJournalDao getUserAccountJournalDao() {
		return userAccountJournalDao;
	}

	public void setUserAccountJournalDao(
			IUserAccountJournalDao userAccountJournalDao) {
		this.userAccountJournalDao = userAccountJournalDao;
	}

	public IUserAccountVoucherBillDao getUserAccountVoucherBillDao() {
		return userAccountVoucherBillDao;
	}

	public void setUserAccountVoucherBillDao(
			IUserAccountVoucherBillDao userAccountVoucherBillDao) {
		this.userAccountVoucherBillDao = userAccountVoucherBillDao;
	}


}
